Beispiel #1
0
        protected void SetOnSubsentSNTFINAL(XElement subsent, TonalityType sntfinal)
        {
            subsent.ThrowIfNotSubsent();


            subsent.SetAttributeSNTFINAL(sntfinal);

            foreach (var element in from e in subsent.ElementsExceptT()
                     where !e.IsElementSUBSENT()
                     from d in e.DescendantsAndSelf()
                     where d.HasAttributeSNTFINAL()
                     select d)
            {
                element.SetAttributeSNTFINAL(sntfinal);
            }
        }
Beispiel #2
0
 public bool Exists(TonalityType a3, TonalityType a4)
 {
     return(_ConditionHashset.Contains(new Pair <TonalityType, TonalityType>(a3, a4)));
 }
 public static string ToText(this TonalityType tonalityType)
 {
     return(tonalityType.ToString());
 }
Beispiel #4
0
 public bool Exists(TonalityType a1)
 {
     return(_ConditionHashset.Contains(a1));
 }
 public bool Exists(TonalityType parent, TonalityType child)
 {
     return(_ConditionHashset.Contains(new Pair <TonalityType, TonalityType>(parent, child)));
 }
 public void SetFINAL(TonalityType sntfinal)
 {
     SNTFINAL = sntfinal;
 }
 public void SetFINAL(TonalityType sntfinal, int frtfinal)
 {
     SNTFINAL = sntfinal;
     FRTFINAL = frtfinal;
 }
 public void Set(TonalityType snt)
 {
     SNT = snt;
 }
 public void Set(TonalityType snt, int frt)
 {
     SNT = snt;
     FRT = frt;
 }
Beispiel #10
0
        public static XElement CreateEntitiesFromSubsentPartial(this XElement subsent, TonalityType snt, int frt)
        {
            subsent.ThrowIfNotSubsent();

            var ID   = subsent.Attribute(Consts.ID_ATTRIBUTE);
            var TYPE = subsent.Attribute(Consts.TYPE_ATTRIBUTE);

            ID.ThrowIfNull(Consts.ID_ATTRIBUTE);
            TYPE.ThrowIfNull(Consts.TYPE_ATTRIBUTE);

            ID   = new XAttribute(Consts.ID_ATTRIBUTE, ID.Value);
            TYPE = new XAttribute(Consts.TYPE_ATTRIBUTE, TYPE.Value);

            var newEntities = new XElement(Consts.ENTITIES_ELEMENT, ID, TYPE);

            newEntities.SetAttributeSNT(snt);
            newEntities.SetAttributeFRT(frt);

            return(newEntities);
        }
 public static void SetAttributeSNTFINAL(this XElement element, TonalityType type)
 {
     element.SetAttribute(Consts.SNTFINAL_ATTRIBUTE, type.ToText());
 }
Beispiel #12
0
 public bool Exists(TonalityType a1, TonalityType a2, TonalityType a3)
 {
     return(_ConditionHashset.Contains(new Tuple3 <TonalityType, TonalityType, TonalityType>(a1, a2, a3)));
 }