From: <lh...@us...> - 2008-08-07 14:28:46
|
Revision: 102 http://tinytim.svn.sourceforge.net/tinytim/?rev=102&view=rev Author: lheuer Date: 2008-08-07 14:28:52 +0000 (Thu, 07 Aug 2008) Log Message: ----------- - Imported current dev.status of tinyTiM 2. Modified Paths: -------------- tinytim/trunk/src/main/java/org/tinytim/voc/TMDM.java tinytim/trunk/src/main/java/org/tinytim/voc/XTM10.java Added Paths: ----------- tinytim/trunk/src/main/java/org/tinytim/utils/ tinytim/trunk/src/main/java/org/tinytim/utils/Feature.java tinytim/trunk/src/main/java/org/tinytim/utils/ICollectionFactory.java tinytim/trunk/src/main/java/org/tinytim/utils/Property.java tinytim/trunk/src/main/java/org/tinytim/utils/TypeInstanceConverter.java tinytim/trunk/src/main/java/org/tinytim/voc/Vocabulary.java tinytim/trunk/src/main/java/org/tinytim/voc/XSD.java Added: tinytim/trunk/src/main/java/org/tinytim/utils/Feature.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/utils/Feature.java (rev 0) +++ tinytim/trunk/src/main/java/org/tinytim/utils/Feature.java 2008-08-07 14:28:52 UTC (rev 102) @@ -0,0 +1,92 @@ +/* + * This is tinyTiM, a tiny Topic Maps engine. + * + * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ +package org.tinytim.utils; + +/** + * This class provides access to the feature strings that TMAPI-compatible + * Topic Maps processors must recognize (but not necessarily support). + * + * Copied from the TMAPIX-project. + * + * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> + * @version $Rev$ - $Date$ + */ +public final class Feature { + + private Feature() { + // noop. + } + + private static final String _FEATURE_BASE = "http://tmapi.org/features/"; + + /** + * An implementation which supports this feature can process locator + * addresses in URI notation as defined by RFC 2396. + * + * An implementation that supports URI notation locators MUST support + * the expansion of relative URIs that use a hierarchical URI scheme to + * fully specified URIs against a specified base URI, and MAY support + * the expansion of relative URIs that use other scheme-specific mechansims + * for relative URI expansion. + */ + public static final String NOTATION_URI= _FEATURE_BASE + "notation/URI"; + + /** + * An implementation which supports this feature supports the Topic Maps + * data model defined by the XTM 1.0 specification. + */ + public static final String XTM_1_0 = _FEATURE_BASE + "model/xtm1.0"; + + /** + * An implementation which supports this feature supports the + * <a href="http://www.isotopicmaps.org/sam/sam-model/">Topic Maps + * Data Model (TMDM) ISO/IEC 13250-2</a>. + */ + public static final String XTM_1_1 = _FEATURE_BASE + "model/xtm1.1"; + + /** + * An implementation which supports this feature MUST detect when two + * topic instances have topic names which match both in the scope of the + * name and the value of the name string, and, if XTM 1.1 is supported, + * the types are equal. Topics which have matching names must either be + * merged or a {@link org.tmapi.core.TopicsMustMergeException} must be + * raised, depending on the value of the + * <a href="http://tmapi.org/features/automerge">http://tmapi.org/features/automerge</a> + * feature. + */ + public static final String TNC = _FEATURE_BASE + "merge/byTopicName"; + + /** + * This feature indicates that the underlying + * {@link org.tmapi.core.TopicMapSystem} cannot be modified. + */ + public static final String READ_ONLY = _FEATURE_BASE + "readOnly"; + + /** + * If an implementation supports this feature, then whenever the + * implementation detects that two Topics should be merged (by one or more + * of the merge features defined under + * <a href="http://tmapi.org/features/merge/">http://tmapi.org/features/merge/</a>), + * then the implementation MUST merge the properties of these two Topics + * automatically and transparently to the API client. + */ + public static final String AUTOMERGE = _FEATURE_BASE + "automerge"; +} Property changes on: tinytim/trunk/src/main/java/org/tinytim/utils/Feature.java ___________________________________________________________________ Added: svn:keywords + Rev Date Id Added: svn:eol-style + native Added: tinytim/trunk/src/main/java/org/tinytim/utils/ICollectionFactory.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/utils/ICollectionFactory.java (rev 0) +++ tinytim/trunk/src/main/java/org/tinytim/utils/ICollectionFactory.java 2008-08-07 14:28:52 UTC (rev 102) @@ -0,0 +1,120 @@ +/* + * This is tinyTiM, a tiny Topic Maps engine. + * + * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ +package org.tinytim.utils; + +import java.util.Map; +import java.util.Set; + +/** + * Factory for collections. + * + * Implementations of this interface must provide a default constructor. + * + * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> + * @version $Rev$ - $Date$ + */ +public interface ICollectionFactory { + + /** + * Creates a {@link java.util.Set} with the specified initial <code>size</code>. + * + * @param <E> + * @param size The initial capacity. + * @return + */ + <E> Set<E> createSet(int size); + + /** + * Creates a {@link java.util.Set}. + * + * @param <E> + * @return + */ + <E> Set<E> createSet(); + + /** + * Creates a {@link java.util.Set} with the specified initial <tt>size</tt>. + * + * This is almost equal to {@link #createSet(int)} but the implementation is + * allowed (but not required) to compare the elements by identity. + * + * @param <E> + * @param size The initial capacity. + * @return + */ + <E> Set<E> createIdentitySet(int size); + + /** + * Creates a {@link java.util.Set}. + * + * This is almost equal to {@link #createSet()} but the implementation is + * allowed (but not required) to compare the elements by identity. + * + * @param <E> + * @return + */ + <E> Set<E> createIdentitySet(); + + /** + * Creates a {@link java.util.Map}. + * + * @param <K> + * @param <V> + * @return + */ + <K, V> Map<K, V> createMap(); + + /** + * Creates a {@link java.util.Map} with the specified initial <tt>size</tt>. + * + * @param <K> + * @param <V> + * @param size The initial capacity. + * @return + */ + <K, V> Map<K, V> createMap(int size); + + /** + * Creates a {@link java.util.Map}. + * + * This is almost equal to {@link #createMap()} but the implementation is + * allowed (but not required) to compare the key elements by identity. + * + * @param <K> + * @param <V> + * @return + */ + <K, V> Map<K, V> createIdentityMap(); + + /** + * Creates a {@link java.util.Map} with the specified initial <tt>size</tt>. + * + * This is almost equal to {@link #createMap(int)} but the implementation is + * allowed (but not required) to compare the key elements by identity. + * + * @param <K> + * @param <V> + * @param size The initial capacity. + * @return + */ + <K, V> Map<K, V> createIdentityMap(int size); + +} Property changes on: tinytim/trunk/src/main/java/org/tinytim/utils/ICollectionFactory.java ___________________________________________________________________ Added: svn:keywords + Rev Date Id Added: svn:eol-style + native Added: tinytim/trunk/src/main/java/org/tinytim/utils/Property.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/utils/Property.java (rev 0) +++ tinytim/trunk/src/main/java/org/tinytim/utils/Property.java 2008-08-07 14:28:52 UTC (rev 102) @@ -0,0 +1,45 @@ +/* + * This is tinyTiM, a tiny Topic Maps engine. + * + * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ +package org.tinytim.utils; + +/** + * Provides constants for all tinyTiM-specific TMAPI properties. + * + * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> + * @version $Rev$ - $Date$ + */ +public final class Property { + + private Property() { + // noop. + } + + /** + * Property which indicates the {@link org.tinytim.ICollectionFactory} to use. + * + * The default value of this property depends on the environment: If + * the <a href="http://trove4j.sourceforge.net/">Trove4J</a> lib is found, + * that lib used, otherwise a collection factory which depends on the + * default Java collections. + */ + public static final String COLLECTION_FACTORY = "org.tinytim.util.ICollectionFactory"; + +} Property changes on: tinytim/trunk/src/main/java/org/tinytim/utils/Property.java ___________________________________________________________________ Added: svn:keywords + Rev Date Id Added: svn:eol-style + native Added: tinytim/trunk/src/main/java/org/tinytim/utils/TypeInstanceConverter.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/utils/TypeInstanceConverter.java (rev 0) +++ tinytim/trunk/src/main/java/org/tinytim/utils/TypeInstanceConverter.java 2008-08-07 14:28:52 UTC (rev 102) @@ -0,0 +1,164 @@ +/* + * This is tinyTiM, a tiny Topic Maps engine. + * + * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ +package org.tinytim.utils; + +import java.util.Collection; +import java.util.logging.Logger; + +import org.tinytim.core.TopicMapImpl; +import org.tinytim.voc.TMDM; +import org.tinytim.voc.XTM10; +import org.tmapi.core.Association; +import org.tmapi.core.Locator; +import org.tmapi.core.Role; +import org.tmapi.core.Topic; +import org.tmapi.core.TopicMap; +import org.tmapi.index.TypeInstanceIndex; + +/** + * This class provides functions that can be used to convert the type-instance + * relationships that are modelled as associations into the [types] property + * of {@link org.tmapi.core.Topic}s. + * + * Copied from the TMAPIX-project. + * + * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> + * @version $Rev$ - $Date$ + */ +public final class TypeInstanceConverter { + + //TODO: Implement types -> associations + + private static final Logger LOG = Logger.getLogger(TypeInstanceConverter.class.getName()); + + private TypeInstanceConverter() { + // noop. + } + + /** + * Converts type-instance relationships (TMDM 1.0) and class-instance + * relationships into the [types] property of the {@link org.tmapi.core.Topic}. + * + * @see #convertTMDMAssociationsToTypes(TopicMap) + * @see #convertXTMAssociationsToTypes(TopicMap) + * + * @param topicMap The topic map to convert. + */ + public static void convertAssociationsToTypes(TopicMap topicMap) { + convertTMDMAssociationsToTypes(topicMap); + convertXTMAssociationsToTypes(topicMap); + } + + /** + * Converts class-instance relationships (XTM 1.0) into the [types] property + * of {@link org.tmapi.core.Topic}s. The associations are removed from the + * topic map. + * + * @param topicMap The topic map to convert. + */ + public static void convertXTMAssociationsToTypes(TopicMap topicMap) { + _associationsToTypes(topicMap, XTM10.CLASS_INSTANCE, + XTM10.CLASS, XTM10.INSTANCE); + } + + /** + * Converts type-instance relationships (TMDM 1.0) into the [types] property + * of {@link org.tmapi.core.Topic}s. The associations are removed from the + * topic map. + * + * @param topicMap The topic map to convert. + */ + public static void convertTMDMAssociationsToTypes(TopicMap topicMap) { + _associationsToTypes(topicMap, TMDM.TYPE_INSTANCE, + TMDM.TYPE, TMDM.INSTANCE); + } + + private static void _associationsToTypes(TopicMap topicMap, + Locator typeInstance_, Locator type_, Locator instance_) { + TopicMapImpl tm = (TopicMapImpl) topicMap; + Topic typeInstance = tm.getTopicBySubjectIdentifier(typeInstance_); + if (typeInstance == null) { + return; + } + Topic type = tm.getTopicBySubjectIdentifier(type_); + if (type == null) { + return; + } + Topic instance = tm.getTopicBySubjectIdentifier(instance_); + if (instance == null) { + return; + } + TypeInstanceIndex typeInstanceIdx = tm.getIndexManager().getTypeInstanceIndex(); + if (!typeInstanceIdx.isAutoUpdated()) { + typeInstanceIdx.reindex(); + } + for (Association assoc: typeInstanceIdx.getAssociations(typeInstance)) { + Topic[] pair = _getTypeInstancePair(assoc, type, instance); + if (pair == null) { + continue; + } + pair[1].addType(pair[0]); + assoc.remove(); + } + } + + private static void _info(Association assoc, String msg) { + LOG.info("The association (ID: '" + assoc.getId() + "') cannot be converted into a type property. Reason: " + msg); + } + + private static Topic[] _getTypeInstancePair(Association assoc, Topic type, Topic instance) { + Collection<Role> roles = assoc.getRoles(); + if (roles.size() != 2) { + _info(assoc, "Not a binary association."); + return null; + } + if (assoc.getReifier() != null) { + _info(assoc, "It is reified"); + return null; + } + if (!assoc.getItemIdentifiers().isEmpty()) { + _info(assoc, "It as item identifiers"); + return null; + } + if (!assoc.getScope().isEmpty()) { + _info(assoc, "The scope is not unconstrained"); + return null; + } + Topic[] pair = new Topic[2]; + for (Role role: roles) { + if (type.equals(role.getType())) { + pair[0] = role.getPlayer(); + } + else if (instance.equals(role.getType())) { + pair[1] = role.getPlayer(); + } + } + if (pair[0] == null) { + _info(assoc, "The type player is null."); + return null; + } + if (pair[1] == null) { + _info(assoc, "The instance player is null"); + return null; + } + return pair; + } +} Property changes on: tinytim/trunk/src/main/java/org/tinytim/utils/TypeInstanceConverter.java ___________________________________________________________________ Added: svn:keywords + Rev Date Id Added: svn:eol-style + native Modified: tinytim/trunk/src/main/java/org/tinytim/voc/TMDM.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/voc/TMDM.java 2008-08-07 14:26:19 UTC (rev 101) +++ tinytim/trunk/src/main/java/org/tinytim/voc/TMDM.java 2008-08-07 14:28:52 UTC (rev 102) @@ -20,67 +20,71 @@ */ package org.tinytim.voc; -import org.tinytim.IRI; import org.tmapi.core.Locator; /** * Constants for TMDM 1.0 (model) PSIs. * - * Copied from the Semagia MIO project. + * Copied with permission from the Semagia MIO project. * * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> - * @version $Rev:$ - $Date:$ + * @version $Rev$ - $Date$ */ -public final class TMDM { +public final class TMDM extends Vocabulary { + private TMDM() { + // noop. + } + private static final String _BASE = "http://psi.topicmaps.org/iso13250/model/"; /** * Core concept of type-instance relationships. * Used as association type. */ - public static final Locator TYPE_INSTANCE = new IRI(_BASE + "type-instance"); + public static final Locator TYPE_INSTANCE = _createLocator(_BASE + "type-instance"); /** * Core concept of type within a type-instance relationship. * Used as role type. */ - public static final Locator TYPE = new IRI(_BASE + "type"); + public static final Locator TYPE = _createLocator(_BASE + "type"); /** * Core concept of instance within a type-instance relationship. * Used as role type. */ - public static final Locator INSTANCE = new IRI(_BASE + "instance"); + public static final Locator INSTANCE = _createLocator(_BASE + "instance"); /** * Core concept of supertype-subtype relationship. * Used as association type. */ - public static final Locator SUPERTYPE_SUBTYPE = new IRI(_BASE + "supertype-subtype"); + public static final Locator SUPERTYPE_SUBTYPE = _createLocator(_BASE + "supertype-subtype"); /** * Core concept of supertype within a supertype-subtype relationship. * Used as role type. */ - public static final Locator SUPERTYPE = new IRI(_BASE + "supertype"); + public static final Locator SUPERTYPE = _createLocator(_BASE + "supertype"); /** * Core concept of subtype within a supertype-subtype relationship. * Used as role type. */ - public static final Locator SUBTYPE = new IRI(_BASE + "subtype"); + public static final Locator SUBTYPE = _createLocator(_BASE + "subtype"); /** * Core concept of a topic name. * Used as topic name type. */ - public static final Locator TOPIC_NAME = new IRI(_BASE + "topic-name"); + public static final Locator TOPIC_NAME = _createLocator(_BASE + "topic-name"); /** * Used to indicate that a variant can be used for sorting purposes. * Used as variant theme. */ - public static final Locator SORT = new IRI(_BASE + "sort"); + public static final Locator SORT = _createLocator(_BASE + "sort"); + } Added: tinytim/trunk/src/main/java/org/tinytim/voc/Vocabulary.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/voc/Vocabulary.java (rev 0) +++ tinytim/trunk/src/main/java/org/tinytim/voc/Vocabulary.java 2008-08-07 14:28:52 UTC (rev 102) @@ -0,0 +1,37 @@ +/* + * This is tinyTiM, a tiny Topic Maps engine. + * + * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ +package org.tinytim.voc; + +import org.tinytim.core.Literal; +import org.tmapi.core.Locator; + +/** + * + * + * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> + * @version $Rev:$ - $Date:$ + */ +abstract class Vocabulary { + + protected static Locator _createLocator(String reference) { + return Literal.createIRI(reference); + } +} Property changes on: tinytim/trunk/src/main/java/org/tinytim/voc/Vocabulary.java ___________________________________________________________________ Added: svn:keywords + Rev Date Id Added: svn:eol-style + native Added: tinytim/trunk/src/main/java/org/tinytim/voc/XSD.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/voc/XSD.java (rev 0) +++ tinytim/trunk/src/main/java/org/tinytim/voc/XSD.java 2008-08-07 14:28:52 UTC (rev 102) @@ -0,0 +1,53 @@ +/* + * This is tinyTiM, a tiny Topic Maps engine. + * + * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ +package org.tinytim.voc; + +import org.tmapi.core.Locator; + +/** + * + * + * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> + * @version $Rev:$ - $Date:$ + */ +public final class XSD extends Vocabulary { + + private XSD() { + // noop. + } + + private static final String _BASE = "http://www.w3.org/2001/XMLSchema#"; + + public final static Locator STRING = _createLocator(_BASE + "string"); + + public final static Locator ANY_URI = _createLocator(_BASE + "anyURI"); + + public final static Locator DECIMAL = _createLocator(_BASE + "decimal"); + + public final static Locator INTEGER = _createLocator(_BASE + "integer"); + + public final static Locator INT = _createLocator(_BASE + "int"); + + public final static Locator FLOAT = _createLocator(_BASE + "float"); + + public final static Locator LONG = _createLocator(_BASE + "long"); + +} Property changes on: tinytim/trunk/src/main/java/org/tinytim/voc/XSD.java ___________________________________________________________________ Added: svn:keywords + Rev Date Id Added: svn:eol-style + native Modified: tinytim/trunk/src/main/java/org/tinytim/voc/XTM10.java =================================================================== --- tinytim/trunk/src/main/java/org/tinytim/voc/XTM10.java 2008-08-07 14:26:19 UTC (rev 101) +++ tinytim/trunk/src/main/java/org/tinytim/voc/XTM10.java 2008-08-07 14:28:52 UTC (rev 102) @@ -20,7 +20,6 @@ */ package org.tinytim.voc; -import org.tinytim.IRI; import org.tmapi.core.Locator; /** @@ -34,9 +33,9 @@ * Copied from the Semagia MIO project. * * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> - * @version $Rev:$ - $Date:$ + * @version $Rev$ - $Date$ */ -public final class XTM10 { +public final class XTM10 extends Vocabulary { private static final String _BASE = "http://www.topicmaps.org/xtm/1.0/core.xtm#"; @@ -45,61 +44,61 @@ * represents class-instance relationships between topics, and that is * semantically equivalent to the use of <instanceOf> subelements. */ - public static final Locator CLASS_INSTANCE = new IRI(_BASE + "class-instance"); + public static final Locator CLASS_INSTANCE = _createLocator(_BASE + "class-instance"); /** * The core concept of class; the role of class as played by one of the * members of a class-instance association. */ - public static final Locator CLASS = new IRI(_BASE + "class"); + public static final Locator CLASS = _createLocator(_BASE + "class"); /** * The core concept of instance; the role of instance as played by one of * the members of a class-instance association. */ - public static final Locator INSTANCE = new IRI(_BASE + "instance"); + public static final Locator INSTANCE = _createLocator(_BASE + "instance"); /** * The core concept of superclass-subclass; the class of association that * represents superclass-subclass relationships between topics. */ - public static final Locator SUPERCLASS_SUBCLASS = new IRI(_BASE + "superclass-subclass"); + public static final Locator SUPERCLASS_SUBCLASS = _createLocator(_BASE + "superclass-subclass"); /** * The core concept of superclass; the role of superclass as played by one * of the members of a superclass-subclass association. */ - public static final Locator SUPERCLASS = new IRI(_BASE + "superclass"); + public static final Locator SUPERCLASS = _createLocator(_BASE + "superclass"); /** * The core concept of subclass; the role of subclass as played by one of * the members of a superclass-subclass association. */ - public static final Locator SUBCLASS = new IRI(_BASE + "subclass"); + public static final Locator SUBCLASS = _createLocator(_BASE + "subclass"); /** * The core concept of association; the generic class to which all * associations belong unless otherwise specified. */ - public static final Locator ASSOCIATION = new IRI(_BASE + "association"); + public static final Locator ASSOCIATION = _createLocator(_BASE + "association"); /** * The core concept of occurrence; the generic class to which all * occurrences belong unless otherwise specified. */ - public static final Locator OCCURRENCE = new IRI(_BASE + "occurrence"); + public static final Locator OCCURRENCE = _createLocator(_BASE + "occurrence"); /** * Used to indicate that a variant can be used for sorting purposes. * Used as variant theme. */ - public static final Locator SORT = new IRI(_BASE + "sort"); + public static final Locator SORT = _createLocator(_BASE + "sort"); /** * Used to indicate that a variant can be used for displaying purposes. * Used as variant theme. */ - public static final Locator DISPLAY = new IRI(_BASE + "display"); + public static final Locator DISPLAY = _createLocator(_BASE + "display"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |